import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
    name: 'sencondToTime'
})

export class SencondToTimePipe implements PipeTransform {
    transform(value: any, ...args: any[]): any {
        return this.getTodyTime(value)
    }
    getTodyTime(time){
        let date = new Date();
        date.setHours(0);
        date.setMinutes(0);
        date.setSeconds(0);
        date.setMilliseconds(0);
        return new Date(date.getTime()+Number(time)*1000).toTimeString().split(" ")[0];
    }
}